package com.infnoon.parking.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.Builder;
import lombok.Data;

/**
 * 
 * @TableName parkingrecords
 */
@TableName(value ="parkingrecords")
@Data
@Builder
public class Parkingrecords implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer parkingRecordID;

    /**
     * 
     */
    private String carnumber;

    /**
     * 
     */
    private Date timeCome;

    /**
     * 
     */
    private Date timeLeave;

    /**
     * 
     */
    private Integer carLotNumber;

    /**
     * 
     */
    private Date parkdate;

    /**
     * 
     */
    private Float parkingFee;

    private int isFinished;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Parkingrecords other = (Parkingrecords) that;
        return (this.getParkingRecordID() == null ? other.getParkingRecordID() == null : this.getParkingRecordID().equals(other.getParkingRecordID()))
            && (this.getCarnumber() == null ? other.getCarnumber() == null : this.getCarnumber().equals(other.getCarnumber()))
            && (this.getTimeCome() == null ? other.getTimeCome() == null : this.getTimeCome().equals(other.getTimeCome()))
            && (this.getTimeLeave() == null ? other.getTimeLeave() == null : this.getTimeLeave().equals(other.getTimeLeave()))
            && (this.getCarLotNumber() == null ? other.getCarLotNumber() == null : this.getCarLotNumber().equals(other.getCarLotNumber()))
            && (this.getParkdate() == null ? other.getParkdate() == null : this.getParkdate().equals(other.getParkdate()))
            && (this.getParkingFee() == null ? other.getParkingFee() == null : this.getParkingFee().equals(other.getParkingFee()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getParkingRecordID() == null) ? 0 : getParkingRecordID().hashCode());
        result = prime * result + ((getCarnumber() == null) ? 0 : getCarnumber().hashCode());
        result = prime * result + ((getTimeCome() == null) ? 0 : getTimeCome().hashCode());
        result = prime * result + ((getTimeLeave() == null) ? 0 : getTimeLeave().hashCode());
        result = prime * result + ((getCarLotNumber() == null) ? 0 : getCarLotNumber().hashCode());
        result = prime * result + ((getParkdate() == null) ? 0 : getParkdate().hashCode());
        result = prime * result + ((getParkingFee() == null) ? 0 : getParkingFee().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", parkingRecordID=").append(parkingRecordID);
        sb.append(", carnumber=").append(carnumber);
        sb.append(", timeCome=").append(timeCome);
        sb.append(", timeLeave=").append(timeLeave);
        sb.append(", carLotNumber=").append(carLotNumber);
        sb.append(", parkdate=").append(parkdate);
        sb.append(", parkingFee=").append(parkingFee);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}